package com.starlink.model.util;

import com.starlink.model.dtomapper.SchoolbagGroupBagBooksDtoMapper;
import com.starlink.model.domain.SchoolbagGroupBagBooksDO;
import com.starlink.model.vo.SchoolbagGroupBagBooksVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class SchoolbagGroupBagBooksConvert {

    public static List<SchoolbagGroupBagBooksVO> buildSchoolbagGroupBagBooksVoList(List<SchoolbagGroupBagBooksDO> schoolbagGroupBagBooksDOList) {
        if (CollectionUtils.isEmpty(schoolbagGroupBagBooksDOList)) {
            return Lists.newArrayList();
        }
        List<SchoolbagGroupBagBooksVO> schoolbagGroupBagBooksVOList = new ArrayList<>();
        for (SchoolbagGroupBagBooksDO schoolbagGroupBagBooksDO : schoolbagGroupBagBooksDOList) {
            schoolbagGroupBagBooksVOList.add(SchoolbagGroupBagBooksDtoMapper.INSTANCE.do2VO(schoolbagGroupBagBooksDO));
        }

        return schoolbagGroupBagBooksVOList;
    }
}
